+2006-05-08 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/question_index.sgml (reference): Update the internationalization
+ answer. (#340951, Kristof Versant)
+
2006-05-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.9.0 ===
translation. _() both marks the string for translation and actually translates it.
</para>
<para>
+Nowadays, GLib provides the common shorthand macros in the header file
+<filename>gi18n.h</filename>, so you don't have to define them yourself, just
+include that header.
+</para>
+<para>
Code using these macros ends up looking like this:
<informalexample>
<programlisting>
- #include <libintl.h>
-
- #define _(x) gettext (x)
- #define N_(x) x
+ #include <gi18n.h>
static const char *global_variable = N_("Translate this string");
</programlisting>
</informalexample>
</para>
+<para>
+Again, GLib comes with the <filename>gi18n-lib.h</filename>, saving you the trouble
+of defining the macros by hand. The macros in that header expect the translation
+domain to be specified by the %GETTEXT_PACKAGE macro.
+</para>
</answer>
</qandaentry>